<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 The ANGLE Project Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.android.angle.test"
      android:versionCode="1"
      android:versionName="1.0">

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.SET_TIME_ZONE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <!-- Explicitly set the attribute requestLegacyExternalStorage to "true"
         since it is "false" by default on apps targeting Android 10, and that
         breaks test listing. See
         https://developer.android.com/training/data-storage#scoped-storage and
         https://developer.android.com/training/data-storage/compatibility. -->
    <!-- Disable allowNativeHeapPointerTagging for siginfo_t POSIX struct
         pointers to match heap allocations. This is required for the
         SystemUtils.PageFaultHandler* tests.
         https://source.android.com/devices/tech/debug/tagged-pointers -->
    <application android:label="NativeTests"
      android:requestLegacyExternalStorage="true"
      android:allowNativeHeapPointerTagging="false">
        <uses-library android:name="android.test.runner"/>
        <activity android:name=".AngleUnitTestActivity"
                android:label="NativeTest"
                android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
                android:exported="true"
                android:process=":test_process">
            <meta-data android:name="android.app.lib_name"
                       android:value="{{ native_library_name }}" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

    <instrumentation android:name="org.chromium.build.gtest_apk.NativeTestInstrumentationTestRunner"
            android:targetPackage="com.android.angle.test"
            android:label="Instrumentation entry point for com.android.angle.test"
            chromium-junit3="true"/>

</manifest>
